<?php
/**
 * Model Traits SchoolTimetable
 * User: zng
 * Date: 2019/11/15
 * Time: 15:08
 */
namespace app\admin\traits\model\user;

Trait Address {

    public function prov()
    {
        return $this->hasOne('Area', 'id', 'prov_id');
    }

    public function city()
    {
        return $this->hasOne('Area', 'id', 'city_id');
    }

    public function area()
    {
        return $this->hasOne('Area', 'id', 'area_id');
    }

    public function user()
    {
        return $this->hasOne('User', 'id', 'uid');
    }

}